package com.vil.mapper;

import java.util.List;

import com.vil.entity.Admin;
import com.vil.entity.Buildings;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface BuildingsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Buildings record);

    int insertSelective(Buildings record);

    Buildings selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Buildings record);

    int updateByPrimaryKey(Buildings record);
    
    //判断小区是否存在
    @Select("select count(1) from buildings where village = #{village}")
    int isExist(@Param("village")String village);

    List<Buildings> getListByManyConditions(Buildings buildings);

    List<Buildings> getListByManyCondition(String village);

    //批量删除
    int deleteMany(Long[] array);

}